package cn.ligoo.part.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.part.dao.TypePartCodeDao;
import cn.ligoo.part.domain.TypePartCode;
import cn.ligoo.part.service.TypePartCodeService;

/**
 * @author Jin,QingHua
 * @version 2013-10-23 13:11:20
 */
@Service
public class TypePartCodeServiceImpl implements TypePartCodeService {

	@Resource
	private TypePartCodeDao typePartCodeDao;

	@Override
	public Long createTypePartCode(TypePartCode t) {
		this.typePartCodeDao.insertEntity(t);
		return t.getId(); // ע��MyBatis��insert��iBATIS��ͬ��
	}

	@Override
	public int modifyTypePartCode(TypePartCode t) {
		return this.typePartCodeDao.updateEntity(t);
	}

	@Override
	public int removeTypePartCode(TypePartCode t) {
		return this.typePartCodeDao.deleteEntity(t);
	}

	@Override
	public TypePartCode getTypePartCode(TypePartCode t) {
		return this.typePartCodeDao.selectEntity(t);
	}

	@Override
	public Long getTypePartCodeCount(TypePartCode t) {
		return this.typePartCodeDao.selectEntityCount(t);
	}

	@Override
	public List<TypePartCode> getTypePartCodeList(TypePartCode t) {
		return this.typePartCodeDao.selectEntityList(t);
	}

}
